package com.jk.mindskip.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.jk.mindskip.dao.TbStudentMapper;
import com.jk.mindskip.dto.TbStudent;
import com.jk.mindskip.service.TbStudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class TbStudentServiceImpl implements TbStudentService {

    @Autowired
    private TbStudentMapper studentMapper;

    @Override
    public TbStudent findTbStudentByUsername(String username) {
        QueryWrapper<TbStudent> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("user_name", username);
        return studentMapper.selectOne(queryWrapper);
    }
}
